// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CourseSeacrhController.java

package com.nervytech.tutorcruise.spring.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.nervytech.tutorcruise.course.beans.CourseSearchResultPageBean;
import com.nervytech.tutorcruise.spring.search.form.TrainerSearchForm;
import com.nervytech.tutorcruise.spring.security.auth.UserDetailsServiceImpl;

@Controller
@RequestMapping({"/pub/search/course","/usr/search/course"})
public class CourseSeacrhController {

	//@RequestMapping(method = RequestMethod.GET)
	public String showTrainersSearchForm(Map model, HttpServletRequest request) {
		com.nervytech.tutorcruise.spring.security.auth.SessionUser usr = UserDetailsServiceImpl
				.currentUserDetails();
		String keyWord = request.getParameter("keyword");
		System.out.println((new StringBuilder(
				"TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT ")).append(keyWord)
				.toString());
		return "coursesearchform";
	}

	@RequestMapping(method = RequestMethod.POST)
	public String searchCourses(TrainerSearchForm searchForm,
			BindingResult result, Map model) {
		com.nervytech.tutorcruise.spring.security.auth.SessionUser usr = UserDetailsServiceImpl
				.currentUserDetails();
		return "coursesearchresult";
	}

	@RequestMapping(method = RequestMethod.GET)
	public String searchHeaderKeywordClasses(Map model,
			HttpServletRequest request) {
		com.nervytech.tutorcruise.spring.security.auth.SessionUser usr = UserDetailsServiceImpl
				.currentUserDetails();
		String keyWord = request.getParameter("keyword");
		String searchType = request.getParameter("stype");
		CourseSearchResultPageBean pageBean = new CourseSearchResultPageBean();
		System.out
				.println("INSIDE SEARCH HSEARCHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH");
		model.put("courseSearchResultPageBean", pageBean);
		return "coursesearchresult";
	}
}
